<extend name="Public/base"/>
<block name="style">
	<link rel="stylesheet" type="text/css" href="__CSS__/zoomify.css" media="all">
</block>
<!-- 子导航 -->
<block name="sidebar">
    <include file="sidemenu" />
</block>


<block name="body">
	<!-- 标题 -->
	<div class="main-title">
		<h2>
		非自主报名信息({$_total})
		</h2>
	</div>

	<!-- 按钮工具栏 -->
	<div class="cf">
		<div class="fl">
			<if condition="is_administrator()">
				<a class="btn" href="{:U("Volunteer/involuntary",array("status"=>1))}">已审核</a>
				<a class="btn" href="{:U("Volunteer/involuntary",array("status"=>0))}">未审核</a>
		    	<button class="btn ajax-post confirm" target-form="ids" url="{:U("Volunteer/setStatus",array("status"=>-1))}">删 除</button>
			</if>
		</div>

		<!-- 高级搜索 -->
		<div class="search-form fr cf">
			<div class="btn-group-click adv-sch-pannel fl" style="margin-right: 10px;">
				<button class="btn">查询方式<i class="btn-arrowdown"></i></button>
				<div class="dropdown cf">
					<div class="row" id="search_type">
						<a href="javascript:" data-title="id" data-key="id">id</a>
						<a href="javascript:" data-title="专业名称" data-key="major">专业</a>
						<a href="javascript:" data-title="姓名" data-key="name">姓名</a>
						<a href="javascript:" data-title="身份证号" data-key="ID_number">身份证</a>
						<a href="javascript:" data-title="介绍人名称" data-key="introducer">介绍人</a>
					</div>
				</div>
			</div>
            <div class="btn-group-click adv-sch-pannel fl">
				<button class="btn">导 出<i class="btn-arrowdown"></i></button>
				<div class="dropdown cf">
					<div class="row" id="export_type">
						<a href="{:U('Volunteer/exportExcel',I('get.'))}" id="all">导出查询数据</a>
						<a href="{:U('Volunteer/exportType',array('type'=>'agent'))}" id="agent">按代理id导出</a>
						<a href="{:U('Volunteer/exportType',array('type'=>'department'))}" id="department">按部门导出</a>
						<a href="{:U('Volunteer/exportType',array('type'=>'major'))}" id="major">按专业导出</a>
					</div>
				</div>
            </div>
		</div>
	</div>


	<!-- 数据表格 -->
    <div class="data-table">
		<table class="">
    <thead>
        <tr>
		<th class="row-selected row-selected"><input class="check-all" type="checkbox"/></th>
		<th class="">编号</th>
		<th class="">姓名</th>
		<th class="">身份证号</th>
		<th class="">家庭住址</th>
		<th class="">毕业院校</th>
		<th class="">专业</th>
		<th class="">提交人ID</th>
		<th class="">介绍人</th>
		<th class="">缴费凭证</th>
		<th class="">首次提交时间</th>
		<th class="">交易凭证上传时间</th>
		<th class="">操作</th>
		</tr>
    </thead>
    <tbody>
	 <notempty name="list">
		<volist name="list" id="vo">
		<tr>
            <td><input class="ids" type="checkbox" name="ids[]" value="{$vo.id}" /></td>
			<td>{$vo.id} </td>
			<td><span>{$vo['name']}</span></td>
			<td><span>{$vo['ID_number']}</span></td>
			<td><span>{$vo['home_address']}</span></td>
			<td>{$vo['school']}</td>
			<td><?php $major=M('major')->where(array('id'=>$vo['major']))->field('title')->find(); echo $major['title']; ?></td>
			<td>{$vo['introducer_id']}</td>
			<td>{$vo['introducer']}</td>
			<td><if condition="$vo['pay_evidence'] neq ''"><img width="100" height="50" src="{$vo['pay_evidence']}"><else />还未上传</if></td>
			<td><span>{$vo.create_time|time_format}</span></td>
			<td><span><if condition="$vo['upload_time'] gt 0">{$vo.upload_time|time_format}<else />还未上传</if></span></td>
			<td>
				<if condition="$vo['status'] eq 0">
					<a href="{:U('Volunteer/setStatus?status=1&ids='.$vo['id'])}">审核</a>
				<else />
					<span>已审核</span>
				</if>
				<a href="{:U('Volunteer/editInfo?type='.$vo['type'].'&id='.$vo['id'])}">编辑</a>
				<if condition="is_administrator()">
				 <a href="{:U('Volunteer/setStatus?status=-1&ids='.$vo['id'])}" class="confirm ajax-get">删除</a>
				</if>
             </td>
		</tr>
		</volist>
	 <else/>
		 <td colspan="13" class="text-center"> aOh! 暂时还没有信息! </td>
	 </notempty>
	</tbody>
    </table> 

        
	</div>

	<!-- 分页 -->
    <div class="page">
        {$_page}
    </div>
</div>

</block>
<block name="script">
<link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
<php>if(C('COLOR_STYLE')=='blue_color') echo '<link href="__STATIC__/datetimepicker/css/datetimepicker_blue.css" rel="stylesheet" type="text/css">';</php>
<link href="__STATIC__/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="__JS__/zoomify.js"></script>
<script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
<script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js" charset="UTF-8"></script>
<script type="text/javascript" src="__STATIC__/layer/layer.js" charset="UTF-8"></script>
<script type="text/javascript">
$(function(){
	$('img').zoomify();

	//搜索功能

	$("#search_type a").click(function(){
		var title='请输入'+$(this).attr('data-title'),
		    key=$(this).attr('data-key');
		layer.prompt({title: title, formType: 0}, function(value, index, elem){
			var url='{:U("Volunteer/involuntary")}';
			url += '?'+key+"="+value;
			layer.close(index);
			window.location.href = url;
		});
	});


	/* 状态搜索子菜单 */
	$(".search-form").find(".drop-down").hover(function(){
		$("#sub-sch-menu").removeClass("hidden");
	},function(){
		$("#sub-sch-menu").addClass("hidden");
	});
	$("#sub-sch-menu li").find("a").each(function(){
		$(this).click(function(){
			var text = $(this).text();
			$("#sch-sort-txt").text(text).attr("data",$(this).attr("value"));
			$("#sub-sch-menu").addClass("hidden");
		})
	});

    //导航高亮
    highlight_subnav('{:U("Volunteer/involuntary")}');

})
</script>
</block>
